home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xultmpl / nsIXULTemplateBuilder.h < prev   
C/C++ Source or Header  |  2006-05-08  |  21KB  |  571 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIXULTemplateBuilder.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIXULTemplateBuilder_h__
  6. #define __gen_nsIXULTemplateBuilder_h__
  7.  
  8.  
  9. #ifndef __gen_domstubs_h__
  10. #include "domstubs.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsISupports_h__
  14. #include "nsISupports.h"
  15. #endif
  16.  
  17. #ifndef __gen_nsIRDFCompositeDataSource_h__
  18. #include "nsIRDFCompositeDataSource.h"
  19. #endif
  20.  
  21. #ifndef __gen_nsIRDFResource_h__
  22. #include "nsIRDFResource.h"
  23. #endif
  24.  
  25. /* For IDL files that don't want to include root IDL files. */
  26. #ifndef NS_NO_VTABLE
  27. #define NS_NO_VTABLE
  28. #endif
  29. class nsIXULBuilderListener; /* forward declaration */
  30.  
  31.  
  32. /* starting interface:    nsIXULTemplateBuilder */
  33. #define NS_IXULTEMPLATEBUILDER_IID_STR "9da147a7-5854-49e3-a397-22ecdd93e96d"
  34.  
  35. #define NS_IXULTEMPLATEBUILDER_IID \
  36.   {0x9da147a7, 0x5854, 0x49e3, \
  37.     { 0xa3, 0x97, 0x22, 0xec, 0xdd, 0x93, 0xe9, 0x6d }}
  38.  
  39. class NS_NO_VTABLE nsIXULTemplateBuilder : public nsISupports {
  40.  public: 
  41.  
  42.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXULTEMPLATEBUILDER_IID)
  43.  
  44.   /**
  45.      * The ``root'' node in the DOM to which this builder is attached
  46.      */
  47.   /* readonly attribute nsIDOMElement root; */
  48.   NS_IMETHOD GetRoot(nsIDOMElement * *aRoot) = 0;
  49.  
  50.   /**
  51.      * The composite datasource that the template builder observes
  52.      * and uses to create content
  53.      */
  54.   /* readonly attribute nsIRDFCompositeDataSource database; */
  55.   NS_IMETHOD GetDatabase(nsIRDFCompositeDataSource * *aDatabase) = 0;
  56.  
  57.   /**
  58.      * Force the template builder to rebuild its content.
  59.      */
  60.   /* void rebuild (); */
  61.   NS_IMETHOD Rebuild(void) = 0;
  62.  
  63.   /**
  64.      * Reload any of our RDF datasources that support nsIRDFRemoteDatasource. 
  65.      *
  66.      * @note This is a temporary hack so that remote-XUL authors can
  67.      *       reload remote datasources. When RDF becomes remote-scriptable,
  68.      *       this will no longer be necessary.
  69.      */
  70.   /* void refresh (); */
  71.   NS_IMETHOD Refresh(void) = 0;
  72.  
  73.   /**
  74.      * Called to initialize a XUL content builder on a particular root
  75.      * element. This element presumably has a ``datasources''
  76.      * attribute, which the builder will parse to set up the template
  77.      * builder's datasources.
  78.      */
  79.   /* [noscript] void init (in nsIContent_ptr aElement); */
  80.   NS_IMETHOD Init(nsIContent * aElement) = 0;
  81.  
  82.   /**
  83.      * Invoked lazily by a XUL element that needs its child content
  84.      * built.
  85.      */
  86.   /* [noscript] void createContents (in nsIContent_ptr aElement); */
  87.   NS_IMETHOD CreateContents(nsIContent * aElement) = 0;
  88.  
  89.   /**
  90.      * Add a listener to this template builder. The template builder
  91.      * holds a strong reference to the listener.
  92.      */
  93.   /* void addListener (in nsIXULBuilderListener aListener); */
  94.   NS_IMETHOD AddListener(nsIXULBuilderListener *aListener) = 0;
  95.  
  96.   /**
  97.      * Remove a listener from this template builder.
  98.      */
  99.   /* void removeListener (in nsIXULBuilderListener aListener); */
  100.   NS_IMETHOD RemoveListener(nsIXULBuilderListener *aListener) = 0;
  101.  
  102. };
  103.  
  104. /* Use this macro when declaring classes that implement this interface. */
  105. #define NS_DECL_NSIXULTEMPLATEBUILDER \
  106.   NS_IMETHOD GetRoot(nsIDOMElement * *aRoot); \
  107.   NS_IMETHOD GetDatabase(nsIRDFCompositeDataSource * *aDatabase); \
  108.   NS_IMETHOD Rebuild(void); \
  109.   NS_IMETHOD Refresh(void); \
  110.   NS_IMETHOD Init(nsIContent * aElement); \
  111.   NS_IMETHOD CreateContents(nsIContent * aElement); \
  112.   NS_IMETHOD AddListener(nsIXULBuilderListener *aListener); \
  113.   NS_IMETHOD RemoveListener(nsIXULBuilderListener *aListener); 
  114.  
  115. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  116. #define NS_FORWARD_NSIXULTEMPLATEBUILDER(_to) \
  117.   NS_IMETHOD GetRoot(nsIDOMElement * *aRoot) { return _to GetRoot(aRoot); } \
  118.   NS_IMETHOD GetDatabase(nsIRDFCompositeDataSource * *aDatabase) { return _to GetDatabase(aDatabase); } \
  119.   NS_IMETHOD Rebuild(void) { return _to Rebuild(); } \
  120.   NS_IMETHOD Refresh(void) { return _to Refresh(); } \
  121.   NS_IMETHOD Init(nsIContent * aElement) { return _to Init(aElement); } \
  122.   NS_IMETHOD CreateContents(nsIContent * aElement) { return _to CreateContents(aElement); } \
  123.   NS_IMETHOD AddListener(nsIXULBuilderListener *aListener) { return _to AddListener(aListener); } \
  124.   NS_IMETHOD RemoveListener(nsIXULBuilderListener *aListener) { return _to RemoveListener(aListener); } 
  125.  
  126. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  127. #define NS_FORWARD_SAFE_NSIXULTEMPLATEBUILDER(_to) \
  128.   NS_IMETHOD GetRoot(nsIDOMElement * *aRoot) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRoot(aRoot); } \
  129.   NS_IMETHOD GetDatabase(nsIRDFCompositeDataSource * *aDatabase) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDatabase(aDatabase); } \
  130.   NS_IMETHOD Rebuild(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Rebuild(); } \
  131.   NS_IMETHOD Refresh(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Refresh(); } \
  132.   NS_IMETHOD Init(nsIContent * aElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aElement); } \
  133.   NS_IMETHOD CreateContents(nsIContent * aElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateContents(aElement); } \
  134.   NS_IMETHOD AddListener(nsIXULBuilderListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddListener(aListener); } \
  135.   NS_IMETHOD RemoveListener(nsIXULBuilderListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveListener(aListener); } 
  136.  
  137. #if 0
  138. /* Use the code below as a template for the implementation class for this interface. */
  139.  
  140. /* Header file */
  141. class nsXULTemplateBuilder : public nsIXULTemplateBuilder
  142. {
  143. public:
  144.   NS_DECL_ISUPPORTS
  145.   NS_DECL_NSIXULTEMPLATEBUILDER
  146.  
  147.   nsXULTemplateBuilder();
  148.  
  149. private:
  150.   ~nsXULTemplateBuilder();
  151.  
  152. protected:
  153.   /* additional members */
  154. };
  155.  
  156. /* Implementation file */
  157. NS_IMPL_ISUPPORTS1(nsXULTemplateBuilder, nsIXULTemplateBuilder)
  158.  
  159. nsXULTemplateBuilder::nsXULTemplateBuilder()
  160. {
  161.   /* member initializers and constructor code */
  162. }
  163.  
  164. nsXULTemplateBuilder::~nsXULTemplateBuilder()
  165. {
  166.   /* destructor code */
  167. }
  168.  
  169. /* readonly attribute nsIDOMElement root; */
  170. NS_IMETHODIMP nsXULTemplateBuilder::GetRoot(nsIDOMElement * *aRoot)
  171. {
  172.     return NS_ERROR_NOT_IMPLEMENTED;
  173. }
  174.  
  175. /* readonly attribute nsIRDFCompositeDataSource database; */
  176. NS_IMETHODIMP nsXULTemplateBuilder::GetDatabase(nsIRDFCompositeDataSource * *aDatabase)
  177. {
  178.     return NS_ERROR_NOT_IMPLEMENTED;
  179. }
  180.  
  181. /* void rebuild (); */
  182. NS_IMETHODIMP nsXULTemplateBuilder::Rebuild()
  183. {
  184.     return NS_ERROR_NOT_IMPLEMENTED;
  185. }
  186.  
  187. /* void refresh (); */
  188. NS_IMETHODIMP nsXULTemplateBuilder::Refresh()
  189. {
  190.     return NS_ERROR_NOT_IMPLEMENTED;
  191. }
  192.  
  193. /* [noscript] void init (in nsIContent_ptr aElement); */
  194. NS_IMETHODIMP nsXULTemplateBuilder::Init(nsIContent * aElement)
  195. {
  196.     return NS_ERROR_NOT_IMPLEMENTED;
  197. }
  198.  
  199. /* [noscript] void createContents (in nsIContent_ptr aElement); */
  200. NS_IMETHODIMP nsXULTemplateBuilder::CreateContents(nsIContent * aElement)
  201. {
  202.     return NS_ERROR_NOT_IMPLEMENTED;
  203. }
  204.  
  205. /* void addListener (in nsIXULBuilderListener aListener); */
  206. NS_IMETHODIMP nsXULTemplateBuilder::AddListener(nsIXULBuilderListener *aListener)
  207. {
  208.     return NS_ERROR_NOT_IMPLEMENTED;
  209. }
  210.  
  211. /* void removeListener (in nsIXULBuilderListener aListener); */
  212. NS_IMETHODIMP nsXULTemplateBuilder::RemoveListener(nsIXULBuilderListener *aListener)
  213. {
  214.     return NS_ERROR_NOT_IMPLEMENTED;
  215. }
  216.  
  217. /* End of implementation class template. */
  218. #endif
  219.  
  220.  
  221. /* starting interface:    nsIXULTreeBuilderObserver */
  222. #define NS_IXULTREEBUILDEROBSERVER_IID_STR "a5480e0d-ac7c-42e5-aca5-d7f0bbffa207"
  223.  
  224. #define NS_IXULTREEBUILDEROBSERVER_IID \
  225.   {0xa5480e0d, 0xac7c, 0x42e5, \
  226.     { 0xac, 0xa5, 0xd7, 0xf0, 0xbb, 0xff, 0xa2, 0x07 }}
  227.  
  228. /**
  229.  * nsIXULTreeBuilderObserver
  230.  *  This interface allows clients of the XULTreeBuilder to define domain 
  231.  *  specific handling of specific nsITreeView methods that 
  232.  *  XULTreeBuilder does not implement.
  233.  */
  234. class NS_NO_VTABLE nsIXULTreeBuilderObserver : public nsISupports {
  235.  public: 
  236.  
  237.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXULTREEBUILDEROBSERVER_IID)
  238.  
  239.   enum { DROP_BEFORE = -1 };
  240.  
  241.   enum { DROP_ON = 0 };
  242.  
  243.   enum { DROP_AFTER = 1 };
  244.  
  245.   /**
  246.      * Methods used by the drag feedback code to determine if a drag is allowable at
  247.      * the current location. To get the behavior where drops are only allowed on
  248.      * items, such as the mailNews folder pane, always return false whe
  249.      * the orientation is not DROP_ON.
  250.      */
  251.   /* boolean canDrop (in long index, in long orientation); */
  252.   NS_IMETHOD CanDrop(PRInt32 index, PRInt32 orientation, PRBool *_retval) = 0;
  253.  
  254.   /**
  255.      * Called when the user drops something on this view. The |orientation| param
  256.      * specifies before/on/after the given |row|.
  257.      */
  258.   /* void onDrop (in long row, in long orientation); */
  259.   NS_IMETHOD OnDrop(PRInt32 row, PRInt32 orientation) = 0;
  260.  
  261.   /** 
  262.      * Called when an item is opened or closed. 
  263.      */
  264.   /* void onToggleOpenState (in long index); */
  265.   NS_IMETHOD OnToggleOpenState(PRInt32 index) = 0;
  266.  
  267.   /** 
  268.      * Called when a header is clicked.
  269.      */
  270.   /* void onCycleHeader (in wstring colID, in nsIDOMElement elt); */
  271.   NS_IMETHOD OnCycleHeader(const PRUnichar *colID, nsIDOMElement *elt) = 0;
  272.  
  273.   /**
  274.      * Called when a cell in a non-selectable cycling column (e.g. 
  275.      * unread/flag/etc.) is clicked.
  276.      */
  277.   /* void onCycleCell (in long row, in wstring colID); */
  278.   NS_IMETHOD OnCycleCell(PRInt32 row, const PRUnichar *colID) = 0;
  279.  
  280.   /** 
  281.      * Called when selection in the tree changes
  282.      */
  283.   /* void onSelectionChanged (); */
  284.   NS_IMETHOD OnSelectionChanged(void) = 0;
  285.  
  286.   /**
  287.      * A command API that can be used to invoke commands on the selection.  
  288.      * The tree will automatically invoke this method when certain keys 
  289.      * are pressed.  For example, when the DEL key is pressed, performAction 
  290.      * will be called with the "delete" string. 
  291.      */
  292.   /* void onPerformAction (in wstring action); */
  293.   NS_IMETHOD OnPerformAction(const PRUnichar *action) = 0;
  294.  
  295.   /**
  296.      * A command API that can be used to invoke commands on a specific row.
  297.      */
  298.   /* void onPerformActionOnRow (in wstring action, in long row); */
  299.   NS_IMETHOD OnPerformActionOnRow(const PRUnichar *action, PRInt32 row) = 0;
  300.  
  301.   /**
  302.      * A command API that can be used to invoke commands on a specific cell.
  303.      */
  304.   /* void onPerformActionOnCell (in wstring action, in long row, in wstring colID); */
  305.   NS_IMETHOD OnPerformActionOnCell(const PRUnichar *action, PRInt32 row, const PRUnichar *colID) = 0;
  306.  
  307. };
  308.  
  309. /* Use this macro when declaring classes that implement this interface. */
  310. #define NS_DECL_NSIXULTREEBUILDEROBSERVER \
  311.   NS_IMETHOD CanDrop(PRInt32 index, PRInt32 orientation, PRBool *_retval); \
  312.   NS_IMETHOD OnDrop(PRInt32 row, PRInt32 orientation); \
  313.   NS_IMETHOD OnToggleOpenState(PRInt32 index); \
  314.   NS_IMETHOD OnCycleHeader(const PRUnichar *colID, nsIDOMElement *elt); \
  315.   NS_IMETHOD OnCycleCell(PRInt32 row, const PRUnichar *colID); \
  316.   NS_IMETHOD OnSelectionChanged(void); \
  317.   NS_IMETHOD OnPerformAction(const PRUnichar *action); \
  318.   NS_IMETHOD OnPerformActionOnRow(const PRUnichar *action, PRInt32 row); \
  319.   NS_IMETHOD OnPerformActionOnCell(const PRUnichar *action, PRInt32 row, const PRUnichar *colID); 
  320.  
  321. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  322. #define NS_FORWARD_NSIXULTREEBUILDEROBSERVER(_to) \
  323.   NS_IMETHOD CanDrop(PRInt32 index, PRInt32 orientation, PRBool *_retval) { return _to CanDrop(index, orientation, _retval); } \
  324.   NS_IMETHOD OnDrop(PRInt32 row, PRInt32 orientation) { return _to OnDrop(row, orientation); } \
  325.   NS_IMETHOD OnToggleOpenState(PRInt32 index) { return _to OnToggleOpenState(index); } \
  326.   NS_IMETHOD OnCycleHeader(const PRUnichar *colID, nsIDOMElement *elt) { return _to OnCycleHeader(colID, elt); } \
  327.   NS_IMETHOD OnCycleCell(PRInt32 row, const PRUnichar *colID) { return _to OnCycleCell(row, colID); } \
  328.   NS_IMETHOD OnSelectionChanged(void) { return _to OnSelectionChanged(); } \
  329.   NS_IMETHOD OnPerformAction(const PRUnichar *action) { return _to OnPerformAction(action); } \
  330.   NS_IMETHOD OnPerformActionOnRow(const PRUnichar *action, PRInt32 row) { return _to OnPerformActionOnRow(action, row); } \
  331.   NS_IMETHOD OnPerformActionOnCell(const PRUnichar *action, PRInt32 row, const PRUnichar *colID) { return _to OnPerformActionOnCell(action, row, colID); } 
  332.  
  333. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  334. #define NS_FORWARD_SAFE_NSIXULTREEBUILDEROBSERVER(_to) \
  335.   NS_IMETHOD CanDrop(PRInt32 index, PRInt32 orientation, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanDrop(index, orientation, _retval); } \
  336.   NS_IMETHOD OnDrop(PRInt32 row, PRInt32 orientation) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDrop(row, orientation); } \
  337.   NS_IMETHOD OnToggleOpenState(PRInt32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnToggleOpenState(index); } \
  338.   NS_IMETHOD OnCycleHeader(const PRUnichar *colID, nsIDOMElement *elt) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCycleHeader(colID, elt); } \
  339.   NS_IMETHOD OnCycleCell(PRInt32 row, const PRUnichar *colID) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCycleCell(row, colID); } \
  340.   NS_IMETHOD OnSelectionChanged(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSelectionChanged(); } \
  341.   NS_IMETHOD OnPerformAction(const PRUnichar *action) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnPerformAction(action); } \
  342.   NS_IMETHOD OnPerformActionOnRow(const PRUnichar *action, PRInt32 row) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnPerformActionOnRow(action, row); } \
  343.   NS_IMETHOD OnPerformActionOnCell(const PRUnichar *action, PRInt32 row, const PRUnichar *colID) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnPerformActionOnCell(action, row, colID); } 
  344.  
  345. #if 0
  346. /* Use the code below as a template for the implementation class for this interface. */
  347.  
  348. /* Header file */
  349. class nsXULTreeBuilderObserver : public nsIXULTreeBuilderObserver
  350. {
  351. public:
  352.   NS_DECL_ISUPPORTS
  353.   NS_DECL_NSIXULTREEBUILDEROBSERVER
  354.  
  355.   nsXULTreeBuilderObserver();
  356.  
  357. private:
  358.   ~nsXULTreeBuilderObserver();
  359.  
  360. protected:
  361.   /* additional members */
  362. };
  363.  
  364. /* Implementation file */
  365. NS_IMPL_ISUPPORTS1(nsXULTreeBuilderObserver, nsIXULTreeBuilderObserver)
  366.  
  367. nsXULTreeBuilderObserver::nsXULTreeBuilderObserver()
  368. {
  369.   /* member initializers and constructor code */
  370. }
  371.  
  372. nsXULTreeBuilderObserver::~nsXULTreeBuilderObserver()
  373. {
  374.   /* destructor code */
  375. }
  376.  
  377. /* boolean canDrop (in long index, in long orientation); */
  378. NS_IMETHODIMP nsXULTreeBuilderObserver::CanDrop(PRInt32 index, PRInt32 orientation, PRBool *_retval)
  379. {
  380.     return NS_ERROR_NOT_IMPLEMENTED;
  381. }
  382.  
  383. /* void onDrop (in long row, in long orientation); */
  384. NS_IMETHODIMP nsXULTreeBuilderObserver::OnDrop(PRInt32 row, PRInt32 orientation)
  385. {
  386.     return NS_ERROR_NOT_IMPLEMENTED;
  387. }
  388.  
  389. /* void onToggleOpenState (in long index); */
  390. NS_IMETHODIMP nsXULTreeBuilderObserver::OnToggleOpenState(PRInt32 index)
  391. {
  392.     return NS_ERROR_NOT_IMPLEMENTED;
  393. }
  394.  
  395. /* void onCycleHeader (in wstring colID, in nsIDOMElement elt); */
  396. NS_IMETHODIMP nsXULTreeBuilderObserver::OnCycleHeader(const PRUnichar *colID, nsIDOMElement *elt)
  397. {
  398.     return NS_ERROR_NOT_IMPLEMENTED;
  399. }
  400.  
  401. /* void onCycleCell (in long row, in wstring colID); */
  402. NS_IMETHODIMP nsXULTreeBuilderObserver::OnCycleCell(PRInt32 row, const PRUnichar *colID)
  403. {
  404.     return NS_ERROR_NOT_IMPLEMENTED;
  405. }
  406.  
  407. /* void onSelectionChanged (); */
  408. NS_IMETHODIMP nsXULTreeBuilderObserver::OnSelectionChanged()
  409. {
  410.     return NS_ERROR_NOT_IMPLEMENTED;
  411. }
  412.  
  413. /* void onPerformAction (in wstring action); */
  414. NS_IMETHODIMP nsXULTreeBuilderObserver::OnPerformAction(const PRUnichar *action)
  415. {
  416.     return NS_ERROR_NOT_IMPLEMENTED;
  417. }
  418.  
  419. /* void onPerformActionOnRow (in wstring action, in long row); */
  420. NS_IMETHODIMP nsXULTreeBuilderObserver::OnPerformActionOnRow(const PRUnichar *action, PRInt32 row)
  421. {
  422.     return NS_ERROR_NOT_IMPLEMENTED;
  423. }
  424.  
  425. /* void onPerformActionOnCell (in wstring action, in long row, in wstring colID); */
  426. NS_IMETHODIMP nsXULTreeBuilderObserver::OnPerformActionOnCell(const PRUnichar *action, PRInt32 row, const PRUnichar *colID)
  427. {
  428.     return NS_ERROR_NOT_IMPLEMENTED;
  429. }
  430.  
  431. /* End of implementation class template. */
  432. #endif
  433.  
  434.  
  435. /* starting interface:    nsIXULTreeBuilder */
  436. #define NS_IXULTREEBUILDER_IID_STR "06b31b15-ebf5-4e74-a0e2-6bc0a18a3969"
  437.  
  438. #define NS_IXULTREEBUILDER_IID \
  439.   {0x06b31b15, 0xebf5, 0x4e74, \
  440.     { 0xa0, 0xe2, 0x6b, 0xc0, 0xa1, 0x8a, 0x39, 0x69 }}
  441.  
  442. class NS_NO_VTABLE nsIXULTreeBuilder : public nsISupports {
  443.  public: 
  444.  
  445.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXULTREEBUILDER_IID)
  446.  
  447.   /**
  448.      * Retrieve the RDF resource associated with the specified row.
  449.      */
  450.   /* nsIRDFResource getResourceAtIndex (in long aRowIndex); */
  451.   NS_IMETHOD GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource **_retval) = 0;
  452.  
  453.   /**
  454.      * Retrieve the index associated with specified RDF resource.
  455.      */
  456.   /* long getIndexOfResource (in nsIRDFResource resource); */
  457.   NS_IMETHOD GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval) = 0;
  458.  
  459.   /** 
  460.      * Add a Tree Builder Observer to handle Tree View 
  461.      * methods that the base builder does not implement. 
  462.      */
  463.   /* void addObserver (in nsIXULTreeBuilderObserver aObserver); */
  464.   NS_IMETHOD AddObserver(nsIXULTreeBuilderObserver *aObserver) = 0;
  465.  
  466.   /** 
  467.      * Remove an Tree Builder Observer.
  468.      */
  469.   /* void removeObserver (in nsIXULTreeBuilderObserver aObserver); */
  470.   NS_IMETHOD RemoveObserver(nsIXULTreeBuilderObserver *aObserver) = 0;
  471.  
  472.   /** 
  473.      * Sort the contents of the tree using the specified column.
  474.      */
  475.   /* void sort (in nsIDOMElement aColumnElement); */
  476.   NS_IMETHOD Sort(nsIDOMElement *aColumnElement) = 0;
  477.  
  478. };
  479.  
  480. /* Use this macro when declaring classes that implement this interface. */
  481. #define NS_DECL_NSIXULTREEBUILDER \
  482.   NS_IMETHOD GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource **_retval); \
  483.   NS_IMETHOD GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval); \
  484.   NS_IMETHOD AddObserver(nsIXULTreeBuilderObserver *aObserver); \
  485.   NS_IMETHOD RemoveObserver(nsIXULTreeBuilderObserver *aObserver); \
  486.   NS_IMETHOD Sort(nsIDOMElement *aColumnElement); 
  487.  
  488. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  489. #define NS_FORWARD_NSIXULTREEBUILDER(_to) \
  490.   NS_IMETHOD GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource **_retval) { return _to GetResourceAtIndex(aRowIndex, _retval); } \
  491.   NS_IMETHOD GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval) { return _to GetIndexOfResource(resource, _retval); } \
  492.   NS_IMETHOD AddObserver(nsIXULTreeBuilderObserver *aObserver) { return _to AddObserver(aObserver); } \
  493.   NS_IMETHOD RemoveObserver(nsIXULTreeBuilderObserver *aObserver) { return _to RemoveObserver(aObserver); } \
  494.   NS_IMETHOD Sort(nsIDOMElement *aColumnElement) { return _to Sort(aColumnElement); } 
  495.  
  496. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  497. #define NS_FORWARD_SAFE_NSIXULTREEBUILDER(_to) \
  498.   NS_IMETHOD GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResourceAtIndex(aRowIndex, _retval); } \
  499.   NS_IMETHOD GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIndexOfResource(resource, _retval); } \
  500.   NS_IMETHOD AddObserver(nsIXULTreeBuilderObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(aObserver); } \
  501.   NS_IMETHOD RemoveObserver(nsIXULTreeBuilderObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(aObserver); } \
  502.   NS_IMETHOD Sort(nsIDOMElement *aColumnElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->Sort(aColumnElement); } 
  503.  
  504. #if 0
  505. /* Use the code below as a template for the implementation class for this interface. */
  506.  
  507. /* Header file */
  508. class nsXULTreeBuilder : public nsIXULTreeBuilder
  509. {
  510. public:
  511.   NS_DECL_ISUPPORTS
  512.   NS_DECL_NSIXULTREEBUILDER
  513.  
  514.   nsXULTreeBuilder();
  515.  
  516. private:
  517.   ~nsXULTreeBuilder();
  518.  
  519. protected:
  520.   /* additional members */
  521. };
  522.  
  523. /* Implementation file */
  524. NS_IMPL_ISUPPORTS1(nsXULTreeBuilder, nsIXULTreeBuilder)
  525.  
  526. nsXULTreeBuilder::nsXULTreeBuilder()
  527. {
  528.   /* member initializers and constructor code */
  529. }
  530.  
  531. nsXULTreeBuilder::~nsXULTreeBuilder()
  532. {
  533.   /* destructor code */
  534. }
  535.  
  536. /* nsIRDFResource getResourceAtIndex (in long aRowIndex); */
  537. NS_IMETHODIMP nsXULTreeBuilder::GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource **_retval)
  538. {
  539.     return NS_ERROR_NOT_IMPLEMENTED;
  540. }
  541.  
  542. /* long getIndexOfResource (in nsIRDFResource resource); */
  543. NS_IMETHODIMP nsXULTreeBuilder::GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval)
  544. {
  545.     return NS_ERROR_NOT_IMPLEMENTED;
  546. }
  547.  
  548. /* void addObserver (in nsIXULTreeBuilderObserver aObserver); */
  549. NS_IMETHODIMP nsXULTreeBuilder::AddObserver(nsIXULTreeBuilderObserver *aObserver)
  550. {
  551.     return NS_ERROR_NOT_IMPLEMENTED;
  552. }
  553.  
  554. /* void removeObserver (in nsIXULTreeBuilderObserver aObserver); */
  555. NS_IMETHODIMP nsXULTreeBuilder::RemoveObserver(nsIXULTreeBuilderObserver *aObserver)
  556. {
  557.     return NS_ERROR_NOT_IMPLEMENTED;
  558. }
  559.  
  560. /* void sort (in nsIDOMElement aColumnElement); */
  561. NS_IMETHODIMP nsXULTreeBuilder::Sort(nsIDOMElement *aColumnElement)
  562. {
  563.     return NS_ERROR_NOT_IMPLEMENTED;
  564. }
  565.  
  566. /* End of implementation class template. */
  567. #endif
  568.  
  569.  
  570. #endif /* __gen_nsIXULTemplateBuilder_h__ */
  571.